Learn R Programming

brainGraph (version 3.1.0)

GLM influence measures: Influence measures for a bg_GLM object

Description

These functions compute common (leave-one-out) diagnostics for the models in a bg_GLM object.

Usage

# S3 method for bg_GLM
rstandard(model, type = c("sd.1", "predictive"), ...)

# S3 method for bg_GLM rstudent(model, ...)

# S3 method for bg_GLM hatvalues(model, ...)

# S3 method for bg_GLM cooks.distance(model, ...)

dffits.bg_GLM(model)

# S3 method for bg_GLM dfbeta(model, ...)

# S3 method for bg_GLM dfbetas(model, ...)

covratio.bg_GLM(model)

# S3 method for bg_GLM influence(model, do.coef = TRUE, region = NULL, ...)

Value

Most influence functions return a numeric matrix in which rownames are Study ID's and column names are regions. dfbeta and

dfbetas return a numeric array in which each column is a parameter estimate and the 3rd dimension is for each region. influence returns a list with class infl.bg_GLM and elements:

infmat

Numeric array (like dfbeta) with DFBETAs, DFFITs, covratios, Cook's distance, and hat values

is.inf

Logical array of the same data as infmat; values of TRUE indicate the subject-variable-region combination is an outlier value

f

The model formula

sigma

The leave-one-out residual standard deviation

wt.res

Model residuals

Arguments

model

A bg_GLM object

type

The type of standardized residuals. Default: 'sd.1'

...

Unused

do.coef

Logical indicating whether to calculate dfbeta

region

Character string of the region(s) to return results for. Default is to calculate for all regions

Outlier values

Each variable has a different criterion for determining outliers. In the following: x is the influence variable (for DFBETA, the criterion applies to all DFBETAs); k is the number of columns of the design matrix; dfR is the residual degrees of freedom; and n is the number of observations.

DFBETAs

If \(|x| > 1\)

DFFITs

If \(|x| > 3 \sqrt{k / dfR}\)

covratio

If \(|1 - x| > (3k / dfR)\)

cook

If \(F_{k, dfR}(x) > 0.5\)

hat

If \(x > 3k / n\)

The return object of influence has a print method which will list the subjects/variables/regions for which an outlier was detected.

Author

Christopher G. Watson, cgwatson@bu.edu

Details

The influence method calculates all diagnostics present in lm.influence and influence.measures, consisting of the following functions:

rstandard

Standardized residuals. Choosing type='predictive' returns leave-one-out cross validation residuals. The “PRESS” statistic can be calculated as colSums(resids.p^2)

rstudent

Studentized residuals

hatvalues

The leverage, or the diagonal of the hat/projection matrix

cooks.distance

Cook's distance

dffits.bg_GLM

The change in fitted values when deleting observations

dfbeta

The change in parameter estimates (coefficients) when deleting observations

dfbetas

The scaled change in parameter estimates

covratio.bg_GLM

The covariance ratios, or the change in the determinant of the covariance matrix of parameter estimates when deleting observations

See Also

GLM